﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Webcam.Image.Filters
{
    /// <summary>
    /// An action on an image
    /// </summary>
    public abstract class ImageAction
    {
        /// <summary>
        /// The src image
        /// </summary>
        public RGBImage src;

        /// <summary>
        /// The output data
        /// </summary>
        protected RGBImage output;

        protected ImageAction(RGBImage src)
        {
            this.src = src;
        }

        /// <summary>
        /// Get the output
        /// </summary>
        public virtual RGBImage Output
        {
            get
            {
                if (output == null)
                    return src;

                return output;
            }
            protected set
            {
                this.output = value;
            }
        }

        /// <summary>
        /// Perform the action
        /// </summary>
        public abstract void Process();
    }
}
